package chapter_06_prototype.classic;

/**
 * @author yaochenglong
 * @date 2017/10/16
 */
public class PrototypeClass implements Cloneable {

    /**
     * 重写Object父类的clone()方法
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {
        PrototypeClass prototypeClass = null;

        try {
            prototypeClass = (PrototypeClass) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        return prototypeClass;
    }
}
